using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;

namespace Tools.UI
{
    [AddComponentMenu("Tools/UI/OnPointerEnterEvent")]
    public class OnPointerEnterEvent : MonoBehaviour, IPointerEnterHandler
    {
        [SerializeField] UnityEvent<PointerEventData> onPointerEnterEvent;

        public UnityEvent<PointerEventData> PointerEvent => onPointerEnterEvent;
        
        void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData)
        {
            onPointerEnterEvent?.Invoke(eventData);
        }
    }
}
